package com.yangyu.mapper;

import com.yangyu.message.comment.CommentByBlog;
import com.yangyu.pojo.Comment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author
 * @version V1.0
 * @Package com.yangyu.mapper
 * @date 2021/1/13 20:32
 */
@Repository
public interface CommentMapper {

    boolean addComment(Comment comment);

    List<CommentByBlog> getCommentByBlogId(@Param("blogId") long blogId);

    CommentByBlog getCommentById(@Param("id") long id);

    List<CommentByBlog> getChildComment(@Param("parentId") Long parentId);

    Integer countComments(@Param("blogId") long blogId);
}
